<template>
  <div class="app">
    <MySchool></MySchool>
    <!-- 通过父组件给子组件传递函数类型的props实现，子给父传递数据 -->
    <MyStudent :getstudent="getstudent"></MyStudent>
  </div>
</template>

<script>
import MySchool from './components/MySchool.vue'
import MyStudent from './components/MyStudent.vue'

export default {
  name: 'App',
  components: {
    MySchool,
    MyStudent
  },
  methods:{
    getstudent(name){
      console.log('app收到了学生名:' ,name )
    }
  }
}
</script>

<style>
  .app {
    padding: 100px;
    background-color: skyblue;
}
</style>
